package com.rabbit.vo.req;

import com.rabbit.dto.PageInfoDTO;
import com.rabbit.validate.base.Delete;
import com.rabbit.validate.base.Enable;
import com.rabbit.validate.base.Insert;
import com.rabbit.validate.base.Update;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <h1>字典管理相关请求封装</h1>
 *
 * @author zjw
 * @date 2022/1/21 16:30
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DictReq extends PageInfoDTO {

    /**
     * 字典编号
     */
    @NotNull(message = "字典编号不能为空", groups = {Delete.class, Update.class, Enable.class})
    private Long dictId;

    /**
     * 字典名称
     */
    @NotEmpty(message = "字典名称不能为空", groups = {Insert.class, Update.class})
    private String dictName;

    /**
     * 字典类型
     */
    @NotEmpty(message = "字典类型不能为空", groups = {Insert.class, Update.class})
    private String dictType;

    /**
     * 是否启用（1启用 0禁用)
     */
    @NotNull(message = "状态不能为空", groups = {Enable.class})
    private Boolean isEnabled;

    /**
     * 操作者姓名
     */
    private String operatorUserName;
}
